/* 现代化FTP私有同步云盘样式 */
:root {
  --primary-color: #1a73e8;
  --primary-dark: #0d47a1;
  --primary-light: #5e92f3;
  --secondary-color: #03a9f4;
  --accent-color: #ff5722;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --danger-color: #f44336;
  --dark-color: #2c3e50;
  --light-color: #f8f9fa;
  --text-color: #37474f;
  --text-secondary: #78909c;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
}

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f0f4f8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 头部样式 */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 1.2rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.5px;
}

nav {
  display: flex;
  align-items: center;
}

nav span {
  margin-right: 1rem;
  font-weight: 500;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-speed);
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

/* 主内容区 */
main {
  flex: 1;
  padding: 2rem 0;
}

/* 页脚样式 */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 1.5rem 0;
  text-align: center;
  margin-top: 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-info {
  text-align: left;
}

.footer-info p {
  margin: 0.25rem 0;
}

.version {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: white;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .footer-info {
    text-align: center;
  }
}

/* 卡片样式 */
.card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  animation-fill-mode: both;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
  padding: 1.25rem 1.5rem;
  background-color: var(--light-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.card-header h5 {
  margin: 0;
  color: var(--primary-color);
  font-weight: 600;
}

.card-body {
  padding: 1.5rem;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-speed);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #0288d1;
}

.btn-danger {
  background-color: var(--danger-color);
}

.btn-danger:hover {
  background-color: #d32f2f;
}

.btn-success {
  background-color: var(--success-color);
}

.btn-success:hover {
  background-color: #388e3c;
}

.btn-warning {
  background-color: var(--warning-color);
}

.btn-warning:hover {
  background-color: #f57c00;
}

.btn-info {
  background-color: #00bcd4;
}

.btn-info:hover {
  background-color: #0097a7;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
}

/* 徽章样式 */
.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.375rem;
}

.bg-primary {
  background-color: var(--primary-color);
}

.bg-success {
  background-color: var(--success-color);
}

.bg-warning {
  background-color: var(--warning-color);
}

.bg-danger {
  background-color: var(--danger-color);
}

.bg-info {
  background-color: var(--secondary-color);
}

.bg-secondary {
  background-color: #6c757d;
}

/* 表单样式 */
.form-container, .auth-container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.auth-container {
  max-width: 400px;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.25);
}

small {
  display: block;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-size: 0.85rem;
}

/* 表格样式 */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: white;
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

th, td {
  padding: 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

th {
  background-color: var(--light-color);
  font-weight: 600;
  color: var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(4px);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

tbody tr {
  transition: background-color 0.2s;
}

/* 下拉菜单样式 */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

.dropdown-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.dropdown-menu {
  position: absolute;
  z-index: 1010;
  display: none;
  min-width: 8rem;
  max-width: 10rem;
  padding: 0.5rem 0;
  margin: 0;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  list-style: none;
  border: 1px solid rgba(0,0,0,0.1);
  top: 100%;
  left: 0;
}

/* 显示下拉菜单 */
.dropdown-menu.show {
  display: block;
  animation: fadeIn 0.15s ease-out;
}

/* 移除所有hover相关的显示逻辑 */
.dropdown:hover .dropdown-menu {
  display: none;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  clear: both;
  text-align: left;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: #f0f7ff;
  color: var(--primary-color);
}

/* 添加淡入动画 */
@keyframes fadeIn {
  from { 
    opacity: 0;
    transform: translateY(-5px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* 未知大小的显示样式 */
.unknown-size,
td .unknown-size,
.table .unknown-size,
div.unknown-size {
  color: #000000 !important;
  background: transparent !important;
  background-color: transparent !important;
  font-weight: normal !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 0 !important;
}

/* 但是按钮中的图标保持白色 */
.btn i,
.btn .fa,
.btn .bi,
.btn-sm i,
.btn-sm .fa,
.btn-sm .bi {
  color: white !important;
}

/* 确保表格中的文件夹图标保持白色，而文件夹名称使用文本颜色 */
.table .fa-folder {
  color: white !important;
}

.table .fa-folder + a {
  color: var(--text-color) !important;
}

/* 确保其他图标也保持白色 */
.fa-icon,
.bi-icon,
.icon {
  color: white !important;
}

/* 闪现消息 */
.flash-messages {
  margin-bottom: 1.5rem;
}

.flash {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash-success {
  background-color: #e8f5e9;
  border-left: 4px solid var(--success-color);
  color: #2e7d32;
}

.flash-error {
  background-color: #ffebee;
  border-left: 4px solid var(--danger-color);
  color: #c62828;
}

.flash-info {
  background-color: #e3f2fd;
  border-left: 4px solid var(--primary-color);
  color: #1565c0;
}

.flash-warning {
  background-color: #fff3e0;
  border-left: 4px solid var(--warning-color);
  color: #ef6c00;
}

/* 首页英雄区 */
.hero {
  background: linear-gradient(135deg, var(--primary-color), #5c6bc0);
  color: white;
  padding: 4rem 0;
  text-align: center;
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 80%);
  animation: pulse 15s infinite;
}

@keyframes pulse {
  0% { transform: translate(0, 0); }
  50% { transform: translate(5%, 5%); }
  100% { transform: translate(0, 0); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content h2 {
  font-size: 2.8rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* 功能特性区 */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: transform var(--transition-speed);
}

.feature:hover {
  transform: translateY(-5px);
}

.feature h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-weight: 600;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

/* 工具栏和操作区 */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.toolbar h2, .toolbar h3 {
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.2rem;
  }
  
  nav {
    flex-direction: column;
    align-items: flex-end;
  }
  
  nav a {
    margin-left: 0;
    margin-top: 0.5rem;
  }
  
  .hero-content h2 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 图标支持 */
.bi {
  display: inline-block;
  vertical-align: -0.125em;
  width: 1em;
  height: 1em;
  margin-right: 0.25rem;
}

/* 添加一些动画和过渡效果 */
.fade-in {
  animation: fadeIn 0.5s ease-out;
  animation-duration: 0.8s;
}

.scale-in {
  animation: scaleIn 0.3s ease-out;
  animation-duration: 0.5s;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* 通知增强 */
.notification {
  backdrop-filter: blur(10px);
}

/* 按钮悬停效果增强 */
.btn:active {
  transform: scale(0.97);
}

/* 修改下拉菜单的样式，防止鼠标悬停显示 */
.dropdown:hover .dropdown-menu {
  display: none;
}

/* 只有.show类才能显示菜单 */
.dropdown-menu.show {
  display: block;
}

/* 工具提示样式 */
[data-tooltip] {
  position: relative;
  cursor: pointer;
}

.tooltip {
  position: fixed;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 修复下拉菜单样式 */
.dropdown-toggle.strategy-toggle {
  cursor: pointer;
  transition: all 0.2s;
}

.dropdown-toggle.strategy-toggle:hover {
  background-color: #f8f9fa;
}

/* 图标居中修复 */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.stat-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 按钮中的图标居中 */
.btn i.bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 0.25rem;
    height: 1em;
}

.btn-sm i.bi {
    margin-right: 0;
    font-size: 1rem;
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 统计卡片样式 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    position: relative;
}

.stat-icon i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 按钮组样式优化 */
.btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
}

.btn-sm i.bi {
    margin: 0;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 刷新按钮样式 */
.refresh-btn {
    min-width: 5rem;
    padding: 0.35rem 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.refresh-btn i {
    margin-right: 0.3rem;
}

/* 浏览目录样式 */
.breadcrumb-item a,
.table a,
a[href*="browse_local"],
a[href*="browse_ftp"] {
  color: var(--text-color) !important;
  font-weight: 500;
  text-decoration: none;
}

.breadcrumb-item a:hover,
.table a:hover {
  text-decoration: underline;
  color: var(--text-color) !important;
}

/* 确保所有按钮中的图标为白色 */
.btn i,
.btn .fa,
.btn .bi,
.btn-sm i,
.btn-sm .fa,
.btn-sm .bi {
  color: white !important;
}

/* 确保其他图标也保持白色 */
.fa-icon,
.bi-icon,
.icon {
  color: white !important;
}